/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.patents.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.patents.entity.Patents;
import com.thinkgem.jeesite.modules.patents.dao.PatentsDao;

/**
 * 查询专利信息Service
 * @author wyy
 * @version 2018-10-24
 */
@Service
@Transactional(readOnly = true)
public class PatentsService extends CrudService<PatentsDao, Patents> {

	public Patents get(String id) {
		return super.get(id);
	}

	public List<Patents> findList(Patents patents) {
		return super.findList(patents);
	}

	public Page<Patents> findPage(Page<Patents> page, Patents patents) {
		return super.findPage(page, patents);
	}
	
	@Transactional(readOnly = false)
	public void save(Patents patents) {
		super.save(patents);
	}
	
	@Transactional(readOnly = false)
	public void delete(Patents patents) {
		super.delete(patents);
	}

	//得到年度专利申请数量
	public List<Patents> getCountList(Patents patents){
		return dao.applicationCount(patents);
	}
	//得到年度申请前10数据
	public List<Patents> getTopList(Patents patents){
		return dao.patentTop(patents);
	}
}